<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<%= javascript_include_tag "prototype" %>
<title>calculator</title>
<style type="text/css" media="screen">
#left { text-align: right; }
#right { text-align: right; }
</style>
</head>
<body>
<div id="param">
<%= text_field_tag :left %>
<%= select_tag :operator,
'<option>+</option><option>-</option><option>*</option><option>/</option>' %> <%= text_field_tag :right %>
<%= observe_field :right, :update => :result,
:url => 'calc', :frequency => 0.2, :submit => :param %>
<%= link_to_remote '=', :update => :result_list, :position => :top,
:url => 'update', :submit => :param %>
<span id="result"></span>
</div>
<div id="result_list">
</div>
</body></html>
